#ifndef _BIND_H_
#define _BIND_H_

#include <string>
#include <packet/IQ.h>

/**
 * IQ packet used by Smack to bind a resource and to obtain the jid assigned by the server.
 * There are two ways to bind a resource. One is simply sending an empty Bind packet where the
 * server will assign a new resource for this connection. The other option is to set a desired
 * resource but the server may return a modified version of the sent resource.<p>
 *
 * For more information refer to the following
 * <a href=http://www.xmpp.org/specs/rfc3920.html#bind>link</a>. 
 *
 * @author Gaston Dombiak
 */
class Bind : public IQ {
public:
    Bind() ;
	
	std::string & getResource() {
        return resource;
    }

    void setResource(std::string & resource) {
        this->resource = resource;
    }

	std::string & getJid() {
        return jid;
    }

    void setJid(std::string & jid) {
        this->jid = jid;
    }

	std::string getChildElementXML();

private:
	std::string resource;
	std::string jid;

};
#endif // -- _BIND_H_
